import Vue from 'vue'
import VueRouter from 'vue-router'
import Films from '../views/Films'
import Aritcle from '../views/Article'
import Center from '../views/Center'
import MovieDetail from '../views/Films/MovieDetail'
Vue.use(VueRouter)

const routes = [
    {
        path: '/films',
        name: 'Films',
        component: Films,
        meta: {
            isNav:true
        }
    },
    {
        path: '/article',
        name: 'About',
        component: Aritcle,
        meta: {
            isNav: true
        }
    }, {
        path: "/center",
        name: "Center",
        component: Center,
        meta: {
            isNav: true
        }
    },
    {
        path: "/movie/:id",
        name: "MovieDetail",
        component: MovieDetail
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
